feat(mesh-layers): Port ScenegraphLayer to WebGPU#10112
Conversation
810207d to
3d43d0a
Compare
3d43d0a to
f299c6a
Compare
bb84ae8 to
38405f5
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c2c6121c97
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 23f2a37ab0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| export const scenegraphPbrMaterial = { | ||
| ...pbrMaterial, | ||
| dependencies: [lighting], |
There was a problem hiding this comment.
Preserve the IBL dependency for PBR environments
When _lighting: 'pbr' is used together with _imageBasedLightingEnvironment on WebGPU, the glTF parser sets USE_IBL and supplies the environment sampler bindings, and the wrapped stock PBR WGSL still references pbr_diffuseEnvSampler, pbr_specularEnvSampler, and pbr_brdfLUT under that define. Replacing the module dependencies with only lighting drops the ibl module that declares those bindings, so those scenegraphs fail WGSL validation as soon as IBL is enabled; keep the ibl dependency while omitting only the pbrProjection dependency that this wrapper replaces.
Useful? React with 👍 / 👎.
|
Review follow-up: all reviewer threads are addressed and resolved in 23f2a37. Local build, lint, and the focused ScenegraphLayer test passed; GitHub CI is green. This PR is still draft and still requires review before merge. |
For #9504
Summary
Port
ScenegraphLayerto WebGPU and expose the website demo through the device tabs while keeping the existing WebGL shader paths and behavior intact.WebGPU verification: ScenegraphLayer renders the bundled 20-plane flight snapshot with the WebGPU tab selected. After load, the console remains free of Scenegraph/WebGPU errors; the expected OpenSky CORS fallback and existing arc source-map warnings remain.
Changes
device.type === 'webgpu'.deviceto the image-based-lighting callback and marks the legacyglcallback field deprecated in favor ofdevice.handle.Website examples
Validation
yarn buildyarn lint(passes with existing repository warnings only)